<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>黑马面面</title>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/swiper.min.css">
  <link rel="stylesheet" href="css/index.css">
  <script src="js/flexible.js"></script>
  <script src="js/swiper.min.js"></script>
</head>

<body>
  <div class="wrap1">
    <div class="header">黑马面面</div>
    <nav class="nav">
      <a href="">
        <img src="/icon/icon1.png" alt="">
        <span>HR面试</span>
      </a>
      <a href="">
        <img src="/icon/icon2.png" alt="">
        <span>笔试</span>
      </a>
      <a href="">
        <img src="/icon/icon3.png" alt="">
        <span>计数面试</span>
      </a>
      <a href="">
        <img src="/icon/icon4.png" alt="">
        <span>模拟面试</span>
      </a>
      <a href="">
        <img src="/icon/icon5.png" alt="">
        <span>面试技巧</span>
      </a>
      <a href="">
        <img src="/icon/icon6.png" alt="">
        <span>薪资查询</span>
      </a>
    </nav>
    <div class="go">
      <img src="imges/go.png" alt="">
    </div>
  </div>
  <div class="wrap2">
    <div class="gic_title">
      <span>
        <img src="icon/i2.png" alt="">
        就业指导
      </span>
      <span>
        更多>>
      </span>
    </div>
    <div class="focus1">
      <div class="swiper-container" id="sw1">
        <div class="swiper-wrapper">
          <div class="swiper-slide">
            <a href="#">
              <img src="imges/pic.png" alt="">
              <p>老师教你应对面试技巧</p>
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="imges/2.jpg" alt="">
              <p>老师教你应对面试技巧</p>
            </a>
          </div>
          <div class="swiper-slide">
            <a href="#">
              <img src="imges/3.jpg" alt="">
              <p>老师教你应对面试技巧</p>
            </a>
          </div>
        </div>
      </div>
      <!-- 如果需要导航按钮 -->
      <div class="swiper-button-prev"></div>
      <div class="swiper-button-next"></div>
    </div>
  </div>
  <div class="wrap2">
    <div class="gic_title">
      <span>
        <img src="icon/i1.png" alt="">
        充电学习
      </span>
      <span>
        更多>>
      </span>
    </div>
    <div class="focus2">
      <div class="swiper-container" id="sw2">
        <div class="swiper-wrapper">
          <div class="swiper-slide">
            <img src="/imges/pic1.png" alt="">
            <p>说地道英语，告别中式英语</p>
            <p><span>156</span>人学习</p>
          </div>
          <div class="swiper-slide">
            <img src="/imges/pic2.png" alt="">
            <p>说地道英语，告别中式英语</p>
            <p><span>156</span>人学习</p>
          </div>
          <div class="swiper-slide">
            <img src="/imges/pic1.png" alt="">
            <p>说地道英语，告别中式英语</p>
            <p><span>156</span>人学习</p>
          </div>
          <div class="swiper-slide">
            <img src="/imges/pic2.png" alt="">
            <p>说地道英语，告别中式英语</p>
            <p><span>156</span>人学习</p>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="footer">
    <ul>
      <li>
        <img src="imges/nav2.png" alt="">
        <p>首页</p>
      </li>
      <li> <img src="imges/nav1.png" alt="">
        <p>技术面试</p>
      </li>
      <li> <img src="imges/nav3.png" alt="">
        <p>模拟面试</p>
      </li>
      <li> <img src="imges/nav4.png" alt="">
        <p>我的主页</p>
      </li>
    </ul>
  </div>
  <script>
    var mySwiper = new Swiper('#sw1', {
      watchSlidesProgress: true,
      initialSlide: 2,
      loop: true, // 循环模式选项
      slidesPerView: 3,
      centeredSlides: true,
      loopedSlides: 5,
      loopAdditionalSlides: 0,
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
      },
      on: {
        progress: function (swiper, progress) {
          for (i = 0; i < this.slides.length; i++) {

            var slide = this.slides.eq(i); // 获取swiper slide对象
            var slideProgress = this.slides[i].progress;
            slideProgress = Math.round(slideProgress)//
            translate = -slideProgress * 1.48 + 'rem';
            scale = 1.9 - Math.abs(slideProgress) * 2.3 / 5;
            zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
            slide.transform('translateX(' + translate + ') scale(' + scale + ')');
            slide.css('zIndex', zIndex);
            slide.css('opacity', 1);
            if (Math.abs(slideProgress) == 1) {
              slide.css('opacity', .3);
            } else if (Math.abs(slideProgress) > 1) {
              slide.css('opacity', 0);
            }
          }
        },
        setTransition: function (transition) {
          for (var i = 0; i < this.slides.length; i++) {
            var slide = this.slides.eq(i)
            slide.transition(transition);
          }
        }
      }
    })
    var sw2 = new Swiper('#sw2', {
      loop: false, // 循环模式选项
      slidesPerView: 'auto',
      slidesOffsetBefore: 20,
      spaceBetween: 20
    })   
  </script>
</body>

</html>